home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / clang / cuj1008.zip / 1008078A < prev    next >
Text File  |  1991-12-04  |  573b  |  30 lines

  1. // refitem.hpp
  2. // declaration of RefCntItem -
  3. // a RefCntPtr must point to
  4. // a class derived from this one,
  5. // or to a class that implements
  6. // the same functions
  7.  
  8. #ifndef CLASS_RefCntItem
  9.  #define CLASS_RefCntItem
  10.  
  11.  class RefCntItem
  12.   {
  13.    private:
  14.     unsigned int p_refCnt;
  15.    public:
  16.     RefCntItem (void)
  17.       : p_refCnt(0)
  18.       {};
  19.     void incRefCnt (void)
  20.       { ++p_refCnt;};
  21.     void decRefCnt (void)
  22.       { --p_refCnt;};
  23.     unsigned int refCnt (void)
  24.       { return p_refCnt;};
  25.     virtual ~RefCntItem (void) {};
  26.   };
  27.  
  28. #endif
  29.  
  30.